Add docs for .NET SDK hosting integration#694
Conversation
4ddc590 to
42c6f5e
Compare
Deploying configcat-docs with
|
| Latest commit: |
6f5351f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c81d754c.docs-xmy.pages.dev |
| Branch Preview URL: | https://dotnet-sdk-hosting-docs.docs-xmy.pages.dev |
bb9d605 to
408a801
Compare
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| If your application needs to use multiple ConfigCat configs, it is possible to register additional named clients as follows: |
There was a problem hiding this comment.
It would be nice to have some info on how to obtain the client, a link or something to that part of the documentation.
Also, maybe this whole keyed part can be put into an advanced section in the documentation and here we should only link to it.
There was a problem hiding this comment.
I made an attempt to improve this.
| var client = app.Services.GetRequiredService<IConfigCatClient>(); | ||
| ``` | ||
|
|
||
| Named clients can be resolved similarly, using the `FromKeyedServices` attribute or by |
There was a problem hiding this comment.
It would be nice to have a code example on how to obtain the client in a constructur with a default client and with a keyed client too.
There was a problem hiding this comment.
Added some code examples.
| Alternatively, by code: | ||
|
|
||
| ```csharp | ||
| configCatBuilder.UseInitMode(new ConfigCatInitMode.WaitForClientReady(throwOnFailure: false)); |
There was a problem hiding this comment.
It would be nice to talk a bit about the throwOnFailure parameter here too.
There was a problem hiding this comment.
It's mentioned a few line above, plus in the snapshots section.
I think it's pretty self-explanatory and it's also thoroughly documented in the intellisense docs anyway.
|
|
||
| ## Sample Applications | ||
|
|
||
| Check out our Sample Applications how they use the _ConfigCat SDK_: |
There was a problem hiding this comment.
As I see the same sample apps are listed for both the DI stuff and the old one. Is this intentional?
There was a problem hiding this comment.
I think it's better this way for discoverability reasons.
| ## Look under the hood | ||
|
|
||
| - <a href="https://github.com/configcat/.net-sdk" target="_blank">ConfigCat .NET SDK on GitHub</a> | ||
| - <a href="https://www.nuget.org/packages/ConfigCat.Client" target="_blank">ConfigCat .NET SDK on nuget.org</a> |
There was a problem hiding this comment.
Don't we have another package for the generic host one?
Describe the purpose of your pull request
Adds docs for the new .NET SDK integration with
Microsoft.Extensions.*.Also, does some minor corrections in other SDK references.
(The errors reported by the "Validate Document" check are expected.)
Related issues (only if applicable)
https://trello.com/c/8kt5LPsU
How to test? (only if applicable)
Another version of the .NET SDK Reference has been created under the name "ASP.NET Core & DI-Based Apps". Mostly it's the same content but there are some differences in text, code samples and links.
Requirement checklist